permissions 0.4.1

Library to query for file permissions (read, write, execute, removal and creation).
Documentation

permissions

Crates.io License Docs.rs

Useful filesystem queries for file permissions:

See functions.

Windows support

This library now supports Windows, however, it hasn't been fully tested.

Please, open an issue if you find any problems.

Examples:

use permissions::*;

fn main() -> std::io::Result<()> {
   // Functions accept `AsRef<Path>`
   assert!(is_readable("src/")?);
   assert!(is_writable("src/")?);
   assert!(is_writable("src/lib.rs")?);
   assert!(is_executable("/usr/bin/cat")?);
   assert!(is_removable("src/lib.rs")?);
   assert!(is_creatable("src/file.rs")?);

   Ok(())
}

Future

I plan on adding a rwx permission interface, but I never needed it.

If you need it, create an issue.

Helping/Contributing:

  • Use it and give feedback.
  • Suggest how to improve.
  • Open an issue or PR in the repository.
  • Help improve this README or other docs (even little details).